package com.tdkj.model.enterprisezone;

import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.List;

import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.JoinColumns;
import javax.persistence.JoinTable;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.OneToOne;
import javax.persistence.Table;

import com.tdkj.model.base.BaseEntity;
import com.tdkj.model.user.BeanUser;

@Entity
@Table(name = "ezone_comment")
public class BeanEnterpriseZoneComment extends BaseEntity{
	
	private BeanUser user;
	private String content;
	private BeanEnterpriseZoneReply reply ;
	private Timestamp postTime;
	private BeanEnterpriseZone enterpriseZone; 
	
	@ManyToOne(fetch = FetchType.EAGER )
	@JoinColumn(name="user_id")
	public BeanUser getUser() {
		return user;
	}
	public void setUser(BeanUser user) {
		this.user = user;
	}

	public String getContent() {
		return content;
	}
	public void setContent(String content) {
		this.content = content;
	}
	
	public Timestamp getPostTime() {
		return postTime;
	}

	public void setPostTime(Timestamp postTime) {
		this.postTime = postTime;
	}
	
	@OneToOne(cascade={CascadeType.ALL},fetch = FetchType.EAGER )
	public BeanEnterpriseZoneReply getReply() {
		return reply;
	}
	public void setReply(BeanEnterpriseZoneReply reply) {
		this.reply = reply;
	}
	
	@ManyToOne
	@JoinColumn(name="enterpriseZone_id")
	public BeanEnterpriseZone getEnterpriseZone() {
		return enterpriseZone;
	}
	public void setEnterpriseZone(BeanEnterpriseZone enterpriseZone) {
		this.enterpriseZone = enterpriseZone;
	}
	
}